package com.example.mysql.jpa.domain;

import lombok.Data;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;

@Data
@Entity
@Table(name = "test")
public class TestBean implements Cloneable
{
    //    @Version
//    @Column(name = "version")
//    private Long version = 0L;

    @Id
    @Column(name = "id")
    private Integer id;

    @Column(name = "a")
    private String a;

    @Column(name = "b")
    private String b;

    @Column(name = "c")
    private String c;

    @Column(name = "d")
    private String d;

    @Override
    public TestBean clone()
    {
        TestBean testBean = new TestBean();
        testBean.setA(a);
        testBean.setB(b);
        testBean.setC(c);
        testBean.setD(d);
        testBean.setId(id);
//        testBean.setVersion(version);
        return testBean;
    }
}
